/*
 * cadProdutoJInternalFrame.java
 *
 * Created on 27/10/2009, 21:03:56
 */
package br.com.fatecpg.zanotti.jframes.cadastros;

import br.com.fatecpg.zanotti.acessobanco.conComboLoja;
import br.com.fatecpg.zanotti.acessobanco.conTableCliente;
import br.com.fatecpg.zanotti.acessobanco.dmlCliente;
import br.com.fatecpg.zanotti.jframes.MDI;
import br.com.fatecpg.zanotti.jframes.consultas.conClienteJInternalFrame;
import br.com.fatecpg.zanotti.modelo.Cliente;

/**
 *Classe do jInternalFrame de Cadastro de Clientes
 * @author Luiz Zanotti
 */
public class cadClienteJInternalFrame extends javax.swing.JInternalFrame {

    private static cadClienteJInternalFrame p;

    public static cadClienteJInternalFrame getInstancia() {
        if (p == null) {
            p = new cadClienteJInternalFrame();
        }
        return p;
    }

    /** 
     *Cria um novo cadProdutoJInternalFrame.
     *Seta os itens da ComboBox Loja
     */
    public cadClienteJInternalFrame() {
        initComponents();

        conComboLoja con = new conComboLoja();

        String[] teste = con.consulta();

        lojajComboBox.removeAllItems();
        lojajComboBox.addItem(teste[0]);
        lojajComboBox.addItem(teste[1]);
        cdclientejTextField.setVisible(false);
    }


    /**
     * Método utilizado para inserir um texto no campo cdcliente
     * @param s Texto
     */
    public void setCdclientejTextField(String s) {
        this.cdclientejTextField.setText(s);
    }
/**
 * Método utilizado para alterar o título da janela.
 * @param x Texto
 */
    public void alterarCadCliente(String x) {
        setTitle(x);
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        cdclientejTextField = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        nomejLabel = new javax.swing.JLabel();
        nomejTextField = new javax.swing.JTextField();
        cpfjLabel = new javax.swing.JLabel();
        dtnascjLabel = new javax.swing.JLabel();
        lojajLabel = new javax.swing.JLabel();
        teljLabel = new javax.swing.JLabel();
        cadastrarjButton = new javax.swing.JButton();
        datajFormattedTextField = new javax.swing.JFormattedTextField();
        TelefonejFormattedTextField = new javax.swing.JFormattedTextField();
        lojajComboBox = new javax.swing.JComboBox();
        cpfjFormattedTextField = new javax.swing.JFormattedTextField();
        rgjLabel = new javax.swing.JLabel();
        rgjTextField = new javax.swing.JTextField();
        selectExistjButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        endLogjTextField = new javax.swing.JTextField();
        endNumjTextField = new javax.swing.JTextField();
        endCompjTextField = new javax.swing.JTextField();
        endEmailjTextField = new javax.swing.JTextField();
        endBairrojTextField = new javax.swing.JTextField();
        endCidadejTextField = new javax.swing.JTextField();
        endUFjTextField = new javax.swing.JTextField();
        endCEPjTextField = new javax.swing.JTextField();

        setClosable(true);
        setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
        setTitle("Cadastro de Clientes");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        nomejLabel.setText("Nome:");

        cpfjLabel.setText("CPF:");

        dtnascjLabel.setText("Data de Nascimento:");

        lojajLabel.setText("Selecione a Loja:");

        teljLabel.setText("Tel:");

        cadastrarjButton.setText("Cadastrar");
        cadastrarjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadastrarjButtonActionPerformed(evt);
            }
        });

        try {
            datajFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        try {
            TelefonejFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        lojajComboBox.setFont(new java.awt.Font("Times New Roman", 1, 12));
        lojajComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        lojajComboBox.setToolTipText("Selecione a Loja");
        lojajComboBox.setAutoscrolls(true);
        lojajComboBox.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        lojajComboBox.setDoubleBuffered(true);

        try {
            cpfjFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        rgjLabel.setText("RG:");

        selectExistjButton.setText("Selecionar Existente");
        selectExistjButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                selectExistjButtonActionPerformed(evt);
            }
        });

        jLabel1.setText("Logradouro:");

        jLabel2.setText("Número:");

        jLabel3.setText("Complemento:");

        jLabel4.setText("Bairro:");

        jLabel5.setText("Cidade:");

        jLabel6.setText("UF:");

        jLabel7.setText("CEP:");

        jLabel8.setText("E-mail:");

        endUFjTextField.setColumns(2);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(nomejLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nomejTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dtnascjLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(datajFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(lojajLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lojajComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 248, Short.MAX_VALUE)
                        .addComponent(cadastrarjButton))
                    .addComponent(selectExistjButton)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endUFjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endCEPjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endEmailjTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endCompjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endBairrojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(endCidadejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endLogjTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                        .addGap(8, 8, 8)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(endNumjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(rgjLabel)
                        .addGap(18, 18, 18)
                        .addComponent(rgjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(cpfjLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cpfjFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(teljLabel)
                        .addGap(18, 18, 18)
                        .addComponent(TelefonejFormattedTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(selectExistjButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                    .addComponent(nomejLabel)
                    .addComponent(nomejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dtnascjLabel)
                    .addComponent(datajFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rgjLabel)
                    .addComponent(rgjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cpfjLabel)
                    .addComponent(cpfjFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(teljLabel)
                    .addComponent(TelefonejFormattedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(endLogjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(endNumjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(endCompjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(endBairrojTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(endCidadejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(endUFjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(endCEPjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(endEmailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cadastrarjButton)
                    .addComponent(lojajLabel)
                    .addComponent(lojajComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

 /**
  * Ação do botão Cadastrar
  * @param evt
  */
    private void cadastrarjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadastrarjButtonActionPerformed
        Cliente Cliente = new Cliente();

        conComboLoja con = new conComboLoja();

        Cliente.setCDTELEFONE(TelefonejFormattedTextField.getText().toString().replace("(", "").replace(")", "").replace("-", ""));
        Cliente.setCPFCLIENTE(cpfjFormattedTextField.getText().toString().replace(".", "").replace("-", ""));
        Cliente.setRGCLIENTE(rgjTextField.getText().toString());
        Cliente.setCDLOJA(Integer.parseInt(con.consultaCDLOJA(lojajComboBox.getSelectedItem().toString())));
        Cliente.setNMENDLOGRADOURO(endLogjTextField.getText());
        Cliente.setNMEMAIL(endEmailjTextField.getText());
        Cliente.setNMENDBAIRRO(endBairrojTextField.getText());
        Cliente.setNMENDCEP(endCEPjTextField.getText());
        Cliente.setNMENDCIDADE(endCidadejTextField.getText());
        Cliente.setNMENDCOMP(endCompjTextField.getText());
        Cliente.setNMENDNUMERO(endNumjTextField.getText());
        Cliente.setSGENDESTADO(endUFjTextField.getText());
        Cliente.setDTNASCIMENTO(datajFormattedTextField.getText());
        Cliente.setNMCLIENTE(nomejTextField.getText().toString());
        Cliente.setCDCLIENTE(cdclientejTextField.getText());

        boolean b;
        if (cadastrarjButton.getText().equals("Cadastrar")) {
            b = dmlCliente.cadastrar(Cliente);
        } else {

            b = dmlCliente.atualizar(Cliente);
        }


        this.setTitle("Cadastro de Cliente");
        this.setCadastrarJButton("Cadastrar");

        if (b) {
            TelefonejFormattedTextField.setText("");
            cpfjFormattedTextField.setText("");
            rgjTextField.setText("");
            endLogjTextField.setText("");
            endEmailjTextField.setText("");
            endBairrojTextField.setText("");
            endCEPjTextField.setText("");
            endCidadejTextField.setText("");
            endCompjTextField.setText("");
            endNumjTextField.setText("");
            endUFjTextField.setText("");
            datajFormattedTextField.setText("");
            nomejTextField.setText("");
            atualizaCDCLIENTE();
        }

    }//GEN-LAST:event_cadastrarjButtonActionPerformed
/**
 * Método responsável por enviar o número do proximo Código de Cliente a ser gerado
 * para o TextField cdcliente.
 */
    public void atualizaCDCLIENTE(){
conTableCliente con = new conTableCliente();
cdclientejTextField.setText(con.ConsultaUltimoCDCLIENTE());
}
    /**
     * Leva para a tela de Consulta de Cliente.
     * @param evt
     */
    private void selectExistjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectExistjButtonActionPerformed
        this.setVisible(false);
        conClienteJInternalFrame.getInstancia().atualizaTable();
        MDI.getInstancia().concliVis(true);

    }//GEN-LAST:event_selectExistjButtonActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JFormattedTextField TelefonejFormattedTextField;
    private javax.swing.JButton cadastrarjButton;
    private javax.swing.JTextField cdclientejTextField;
    private javax.swing.JFormattedTextField cpfjFormattedTextField;
    private javax.swing.JLabel cpfjLabel;
    private javax.swing.JFormattedTextField datajFormattedTextField;
    private javax.swing.JLabel dtnascjLabel;
    private javax.swing.JTextField endBairrojTextField;
    private javax.swing.JTextField endCEPjTextField;
    private javax.swing.JTextField endCidadejTextField;
    private javax.swing.JTextField endCompjTextField;
    private javax.swing.JTextField endEmailjTextField;
    private javax.swing.JTextField endLogjTextField;
    private javax.swing.JTextField endNumjTextField;
    private javax.swing.JTextField endUFjTextField;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JComboBox lojajComboBox;
    private javax.swing.JLabel lojajLabel;
    private javax.swing.JLabel nomejLabel;
    private javax.swing.JTextField nomejTextField;
    private javax.swing.JLabel rgjLabel;
    private javax.swing.JTextField rgjTextField;
    private javax.swing.JButton selectExistjButton;
    private javax.swing.JLabel teljLabel;
    // End of variables declaration//GEN-END:variables

    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setCadastrarJButton(String s) {
        cadastrarjButton.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setTelefonejFormattedTextField(String s) {
        TelefonejFormattedTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setCpfjFormattedTextField(String s) {
        this.cpfjFormattedTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setDatajFormattedTextField(String s) {
        datajFormattedTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndBairrojTextField(String s) {
        endBairrojTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndCEPjTextField(String s) {
        endCEPjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndCidadejTextField(String s) {
        endCidadejTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndCompjTextField(String s) {
        endCompjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndEmailjTextField(String s) {
        endEmailjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndLogjTextField(String s) {
        endLogjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndNumjTextField(String s) {
        endNumjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setEndUFjTextField(String s) {
        endUFjTextField.setText(s);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Inteiro
     */
    public void setLojajComboBox(int s) {
        lojajComboBox.setSelectedIndex(s - 1);
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setNomejTextField(String s) {
        nomejTextField.setText(String.valueOf(s));
    }
    /**
     * Método utilizado para preencher o campo (Usado em Alteração de Cadastro)
     * @param s Texto
     */
    public void setRgjTextField(String s) {
        rgjTextField.setText(s);
    }
}
